Skip to content

Add guide on choosing entity_id and entity_uri for HERD references#192

Open
bendichter wants to merge 2 commits into
NeurodataWithoutBorders:mainfrom
bendichter:add-herd-entity-id-uri-guide
Open

Add guide on choosing entity_id and entity_uri for HERD references#192
bendichter wants to merge 2 commits into
NeurodataWithoutBorders:mainfrom
bendichter:add-herd-entity-id-uri-guide

Conversation

@bendichter

Copy link
Copy Markdown
Collaborator

Motivation

Moves the reference page proposed in NeurodataWithoutBorders/pynwb#2206 into nwb-overview, where cross-API user guidance lives.

Users adding external resource references with HERD.add_ref need clear guidance on what to put in the entity_id and entity_uri fields, which is currently undocumented and was a recurring point of confusion (e.g. which of the many NCBITaxon / taxonomy / NCBI_TAXON forms to use, and what to do for atlases without per-term URLs).

What this adds

A narrative reference page (docs/source/external_resources_entity_guide.rst), added to the For Users toctree, that documents:

  • entity_id should be a CURIE (prefix:identifier) whose prefix is registered with bioregistry.io. The Bioregistry maps each CURIE to a canonical, resolvable URL and disambiguates overlapping identifier schemes.
  • entity_uri should be the URL the CURIE resolves to, which you can look up via https://bioregistry.io/<entity_id>.
  • A table of commonly used registries (NCBITaxon, ROR, ORCID, UBERON, MBA, HBA, DANDI) with verified example entity_identity_uri pairs and the common NWB fields each applies to.
  • A fallback for resources without per-term URLs (e.g. the macaque D99 atlas): put the resource's overall URL in entity_uri and the term's atlas-specific ID in entity_id.

Notes

  • Cross-references to hdmf.common.resources.HERD / add_ref resolve via the existing hdmf intersphinx mapping in conf_extlinks.py.
  • All example entity_uri values are inline literals (not hyperlinks); only the two stable homepages (bioregistry.io, the W3C CURIE spec) are linked.

🤖 Generated with Claude Code

Moves the reference page proposed in pynwb#2206 into nwb-overview. It
documents how to pick entity_id (a CURIE whose prefix is registered with
bioregistry.io) and entity_uri (the resolved canonical URL) when adding
external resource references with HERD.add_ref, including a table of
commonly used registries and a fallback for resources without per-term
URLs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bendichter bendichter marked this pull request as ready for review June 24, 2026 18:06
Comment on lines +1 to +4
.. _external_resources_entity_guide:

Choosing ``entity_id`` and ``entity_uri`` for external references
=================================================================

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since nwb-overview is an entry-point for users, I think it would be useful if we could transform this page a bit more intro an entry-point for users to the concept of External Resources. The current content is great, and I think a few basic changes would suffice to start to push the page in that direction:

  • Add a page heading "Using External Resources" or maybe "Using Ontologies and Identifiers with NWB" since new users may not know what the term External Resources means
  • Add a brief intro paragraph to describe what External Resources are and why this is useful
  • Add a paragraph (or subsection) on how to use external resources with links to the corresponding tutorials in PyNWB

If those changes would hold up this PR (e.g., require further discussion) then I think it's perfectly fine to also just create a follow-up issue and address this in a separate PR.

@oruebel oruebel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content looks good. Just a small suggestion to make the page a bit more friendly for users who have not used external resources before.

Add a top-level "Using Ontologies and Identifiers with NWB" heading, an
intro explaining what external resources are and why they are useful, and
a "How to add external resources to an NWB file" section linking to the
HDMF HERD and TermSet tutorials and PyNWB's term-validation tutorial. The
existing entity_id/entity_uri guidance becomes a section beneath it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rly

rly commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This looks great. Thanks @bendichter . Can we close the issue in pynwb with this guide?

Also we should update this guide to point to the NWB-specific tutorial in NeurodataWithoutBorders/pynwb#2200 once it's released.

attribute="location",
key="area_42",
entity_id="42",
entity_uri="https://afni.nimh.nih.gov/pub/dist/atlases/macaque/D99_macaque/",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URI doesn't resolve

Suggested change
entity_uri="https://afni.nimh.nih.gov/pub/dist/atlases/macaque/D99_macaque/",
entity_uri="https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/nonhuman/macaque_tempatl/atlas_d99v2.html",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants